package com.weitu.permission.dictionaryType.service.impl;

import com.weitu.permission.dictionaryType.entity.DictionaryType;
import com.weitu.permission.dictionaryType.mapper.DictionaryTypeMapper;
import com.weitu.permission.dictionaryType.service.DictionaryTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by smp on 2017/3/14.
 */
@Service
public class DictionaryTypeServiceImpl implements DictionaryTypeService {

    private final DictionaryTypeMapper dictionaryTypeMapper;

    @Override
    public List<DictionaryType> queryDictionaryTypeList() {
        return dictionaryTypeMapper.queryDictionaryTypeList();
    }

    @Autowired
    public DictionaryTypeServiceImpl(DictionaryTypeMapper dictionaryTypeMapper){
        this.dictionaryTypeMapper=dictionaryTypeMapper;
    }
    @Override
    public List<DictionaryType> queryDictionaryTypeListPage(Map map) {
        return dictionaryTypeMapper.queryDictionaryTypeListPage(map);
    }

    @Override
    public List<DictionaryType> queryDictionaryType(String name) {
        return dictionaryTypeMapper.queryDictionaryType(name);
    }

    @Override
    public int insertDictionaryType(DictionaryType dictionaryType) {
        return dictionaryTypeMapper.insertDictionaryType(dictionaryType);
    }

    @Override
    public int deleteDictionaryType(String id) {
        return dictionaryTypeMapper.deleteDictionaryType(id);
    }

    @Override
    public int updateDictionaryType(DictionaryType dictionaryType) {
        return dictionaryTypeMapper.updateDictionaryType(dictionaryType);
    }
    @Override
    public int queryCount(Map map) {
        return dictionaryTypeMapper.queryCount(map);
    }

    @Override
    public DictionaryType queryDictionaryTypeByID(String id) {
        return dictionaryTypeMapper.queryDictionaryTypeByID(id);
    }

    @Override
    public int queryCountByCode(String code) {
        return this.dictionaryTypeMapper.queryCountByCode(code);
    }
}
